Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): add child prefix check #4143

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

jimjbrettj
Copy link
Contributor

Changes

  • When clearing a prefix from storage, first do a check to make sure the prefix does not contain the child prefix

Tests

go test -tags integration github.com/ChainSafe/gossamer

Issues

closes #4142

@jimjbrettj jimjbrettj changed the title fix(runtime/storage): add child prefix check fix(runtime): add child prefix check Aug 23, 2024
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not panic but return none Afaik

lib/runtime/wazero/imports.go Show resolved Hide resolved
lib/runtime/wazero/imports.go Outdated Show resolved Hide resolved
@jimjbrettj jimjbrettj merged commit e7dc9f7 into development Sep 3, 2024
24 checks passed
@jimjbrettj jimjbrettj deleted the jimmy/childPrefix branch September 3, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore when ext_storage_clear_prefix is called with child trie prefix
3 participants